#include "Message.P2.CancelOrder.h"

namespace AlgoTrading
{
	namespace Messages
	{
		P2CancelOrder::P2CancelOrder(void)
			: RequestWithoutResponse(std::auto_ptr<PBClientMessage>(new PBClientMessage()))
		{
			cancelOrder = requestWithoutResponse->MutableExtension(PBP2CancelOrder::requestWithoutResponse);
			requestWithoutResponse->set_type(PBRequestWithoutResponse_Type_PBP2CancelOrder);
		}

		P2CancelOrder::~P2CancelOrder(void)
		{
		}

		P2CancelOrder::P2CancelOrder(std::auto_ptr<PBClientMessage>& message)
			: RequestWithoutResponse(message)
		{
			cancelOrder = requestWithoutResponse->MutableExtension(PBP2CancelOrder::requestWithoutResponse);
		}


		void P2CancelOrder::SetOrderUniqueId(::google::protobuf::string& orderUniqueId)
		{
			cancelOrder->set_orderuniqueid(orderUniqueId);
		}

		::google::protobuf::string P2CancelOrder::GetOrderUniqueId() const
		{
			return cancelOrder->orderuniqueid();
		}

		RequestWithoutResponse::RequestWithoutResponseMessageType P2CancelOrder::GetRequestWithoutResponseMessageType() const
		{
			return RequestWithoutResponse::CANCEL_ORDER;
		}
	}
}
